package com.mooc.mymooc.dao;

import com.mooc.mymooc.pojo.TempEmail;
import com.mooc.mymooc.pojo.User;
import com.mooc.mymooc.pojo.UserMessage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    public User login(@Param("username") String username, @Param("password") String password);

    public void register(User user);

    public Integer checkActive(Integer id);

    public User findById(Integer id);

    public Integer updateUser(User user);

    public Integer updateImage(User user);

    public Integer updateEmail(User user);

    public Integer updatePwd(User user);

    public List<User> findUserByName(String name);

    public Integer addUser(User user);

    public User findUserByEmail(String email);

    public List<UserMessage> findMessageByUser(Integer id);

    public Integer setMessageRead(Integer id);

    public Integer sendMessageToUser(UserMessage userMessage);

    public List<User> findAllUser();

    public Integer changeUserPassword(TempEmail tempEmail);
}
